<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="col-sm-12">
			<div class="ibox">
				<div class="ibox-body">
					<div class="fixed-table-toolbar">
						<div class="columns pull-left ">
								<!-- <button shiro:hasPermission="information:user:add" type="button" class="btn  btn-primary" onclick="add(1)">
									<i class="fa fa-plus" aria-hidden="true"></i>手动添加
								</button> -->
								<!-- <button shiro:hasPermission="information:user:add" type="button" class="btn  btn-info" onclick="erweimaxiazai()">
									   二维码下载
								</button> -->
								<!-- <button shiro:hasPermission="information:user:add" type="button" class="btn  btn-primary" onclick="add(2)">
									<i class="fa fa-plus" aria-hidden="true"></i>批量添加用户
								</button> -->
								
								<!-- <button shiro:hasPermission="information:user:add" type="button" class="btn  btn-primary" onclick="add(3)">
									<i class="fa fa-plus" aria-hidden="true"></i>导入扫描数据
								</button> -->
								
								<!-- <button shiro:hasPermission="information:user:batchRemove" type="button" class="btn  btn-danger"
									onclick="batchRemove()">
									<i class="fa fa-trash" aria-hidden="true"></i>删除
								</button> -->
									  
						</div>
						<div class="columns pull-right">
							<button class="btn btn-primary" onclick="selectlist()" type="button">
								<i aria-hidden="true" class="fa fa-export"></i>查询
							</button>
						</div>
						<div class="columns pull-right">
							<input id="uname" name="uname" type="text" style="width:100px" class="form-control" placeholder="姓名"> 
						</div>
						<div class="columns pull-right">
							<input id="uorganization" name="uorganization" style="width:120px" type="text" class="form-control" placeholder="学校"> 
						</div>
						<div class="columns pull-right">
							<input id="ugender" name="ugender" type="text" style="width:100px" class="form-control" placeholder="性别"> 
						</div>
						<div class="columns pull-right">
							<input id="uage" name="uage" type="text" style="width:100px" class="form-control" placeholder="年龄"> 
						</div>
						<div class="columns pull-right">
							<input id="mname" name="mname" type="text" style="width:100px" class="form-control" placeholder="医生"> 
						</div>
						
						<div id="outerdiv" style="position:fixed;top:0;left:0;background:rgba(0,0,0,0.7);z-index:2;width:100%;height:100%;display:none;">
						    <div id="innerdiv" style="position:absolute;">
						        <img id="bigimg" style="border:5px solid #fff;" src="" />
						    </div>
						 </div>
						
						<div class="columns pull-right">
								<!-- <button class="btn btn-primary" onclick="exportExcel(2)" type="button">
									<i aria-hidden="true" class="fa fa-export"></i>导出全部列表
								</button>
								 -->
								<!-- <button class="btn btn-primary" onclick="exportExcel(4)" type="button">
									<i aria-hidden="true" class="fa fa-export"></i>导出选中列表
								</button> -->
						</div>
						<!-- <div class="columns pull-right">
							<button class="btn btn-success" onclick="reLoad()">查询</button>
						</div>
						<div class="columns pull-right col-md-2 nopadding">
							<input id="searchName" type="text" class="form-control"
								placeholder="">
						</div> -->
					<table id="exampleTable" data-mobile-responsive="true"  style="table-layout:fixed; word-break:break-all; word-wrap:break-all; font-size:13px;" >
					</table>
				
				</div>
			</div>
		</div>
	</div>

	<!--shiro控制bootstraptable行内按钮看见性 来自bootdo的创新方案 -->
		<div>
			<script type="text/javascript">
				var s_edit_h = 'hidden';
				var s_remove_h = 'hidden';
				var s_resetPwd_h = 'hidden';
			</script>
		</div>
		<div shiro:hasPermission="information:user:edit">
			<script type="text/javascript">
				s_edit_h = '';
			</script>
		</div>
		<div shiro:hasPermission="information:user:remove">
			<script type="text/javascript">
				var s_remove_h = '';
			</script>
		</div>
		<div shiro:hasPermission="information:user:resetPwd">
			<script type="text/javascript">
				var s_resetPwd_h = '';
			</script>
		</div>
	</div>
	<div th:include="include :: footer"></div>
	<script type="text/javascript" src="/js/appjs/information/menzhen/user.js"></script>
	<script type="text/javascript">
		function exportExcel(type) {
			//获取table的分页参数值
			var offset = $('#exampleTable').bootstrapTable('getOptions').pageNumber;
			var limit =( $('#exampleTable').bootstrapTable('getOptions').pageSize -1) * offset;
			data = 'limit='+limit+'&offset='+offset;
			var ids = new Array();
			if(type == 4){
				var rows = $('#exampleTable').bootstrapTable('getSelections'); // 返回所有选择的行，当没有选择的记录时，返回一个空数组
				if (rows.length == 0) {
					layer.msg("请选择要导出的数据");
					return;
				}
				// 遍历所有选择的行数据，取每条数据对应的ID
				$.each(rows, function(i, row) {
					ids[i] = row['uid'];
				});
			}else if(type == 2){
				
			}
			//后端导出的方法
			document.location.href ="/information/user/exportExcel?type="+type+"&"+ data+"&ids="+ids.join(",");
		}
		
		
	</script>
	
	
</body>
<style>
	th {
	    font-weight: bold;
    	font-size: 14px;
    	color:black;
	}
	
</style>
</html>